package com.emapp.lccode.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.emapp.lccode.bean.OrderKt
import com.emapp.lccode.databinding.ListitemXunjianBinding

class XunjianAdapter : BaseQuickAdapter<OrderKt, XunjianAdapter.VH>() {

    class VH(
        parent: ViewGroup,
        val binding: ListitemXunjianBinding = ListitemXunjianBinding.inflate(
            LayoutInflater.from(parent.context), parent, false
        ),
    ) : RecyclerView.ViewHolder(binding.root)

    override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): VH {
        return VH(parent)
    }

    override fun onBindViewHolder(holder: VH, position: Int, item: OrderKt?) {
        holder.binding.tvName.text = item?.name
        holder.binding.tvAddress.text = item?.address
        holder.binding.tvTime.text = item?.create_time
        holder.binding.tvType.text = item?.flow_type
        holder.binding.tvContent.text = item?.content
    }


}